package sac.modelo.data.transacciones;

/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: 
 * License Type: Evaluation
 */
import java.io.Serializable;
import javax.persistence.*;

import sac.modelo.data.maestros.Animal;
import sac.modelo.data.maestros.Enfermedad;
import sac.modelo.data.maestros.Medicamento;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="Control_Sanitario")
public class ControlSanitario implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public ControlSanitario() {
	}
	
	@Column(name="id_control_sanitario", nullable=false)	
	@Id		
	private int id_control_sanitario;
	
	@ManyToOne(targetEntity=Animal.class, fetch=FetchType.LAZY)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK})	
	@JoinColumns({ @JoinColumn(name="Animalid_animal", referencedColumnName="id_animal", nullable=false) })	
	@org.hibernate.annotations.LazyToOne(value=org.hibernate.annotations.LazyToOneOption.NO_PROXY)	
	private Animal animalid_animal1;
	
	@ManyToOne(targetEntity=Enfermedad.class, fetch=FetchType.LAZY)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK})	
	@JoinColumns({ @JoinColumn(name="Enfermedadid_enfermedad", referencedColumnName="id_enfermedad", nullable=false) })	
	@org.hibernate.annotations.LazyToOne(value=org.hibernate.annotations.LazyToOneOption.NO_PROXY)	
	private Enfermedad enfermedadid_enfermedad;
	
	@ManyToOne(targetEntity=Medicamento.class, fetch=FetchType.LAZY)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK})	
	@JoinColumns({ @JoinColumn(name="Medicamentoid_medicamento", referencedColumnName="id_medicamento", nullable=false) })	
	@org.hibernate.annotations.LazyToOne(value=org.hibernate.annotations.LazyToOneOption.NO_PROXY)	
	private Medicamento medicamentoid_medicamento;
	
	@Column(name="tratamiento", nullable=true, length=600)	
	private String tratamiento;
	
	@Column(name="descripcion", nullable=false, length=60)	
	private String descripcion;
	
	@Column(name="fecha_diagnostico", nullable=false)	
	@Temporal(TemporalType.DATE)	
	private java.util.Date fecha_diagnostico;
	
	@ManyToMany(targetEntity=ControlSanitario.class)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK})	
	@JoinTable(name="Control_Sanitario_Control_Sanitario", joinColumns={ @JoinColumn(name="Control_Sanitarioid_control_sanitario2") }, inverseJoinColumns={ @JoinColumn(name="Control_Sanitarioid_control_sanitario") })	
	@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE)	
	private java.util.Set<ControlSanitario> control_Sanitarioid_control_sanitario = new java.util.HashSet<ControlSanitario>();
	
	@ManyToMany(mappedBy="enfermedadid_enfermedad", targetEntity=Animal.class)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK})	
	@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE)	
	private java.util.Set<Animal> animalid_animal = new java.util.HashSet<Animal>();
	
	@ManyToMany(mappedBy="control_Sanitarioid_control_sanitario", targetEntity=ControlSanitario.class)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK})	
	@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE)	
	private java.util.Set<ControlSanitario> control_Sanitarioid_control_sanitario2 = new java.util.HashSet<ControlSanitario>();
	
	private void setId_control_sanitario(int value) {
		this.id_control_sanitario = value;
	}
	
	public int getId_control_sanitario() {
		return id_control_sanitario;
	}
	
	public int getORMID() {
		return getId_control_sanitario();
	}
	
	public void setTratamiento(String value) {
		this.tratamiento = value;
	}
	
	public String getTratamiento() {
		return tratamiento;
	}
	
	public void setDescripcion(String value) {
		this.descripcion = value;
	}
	
	public String getDescripcion() {
		return descripcion;
	}
	
	public void setFecha_diagnostico(java.util.Date value) {
		this.fecha_diagnostico = value;
	}
	
	public java.util.Date getFecha_diagnostico() {
		return fecha_diagnostico;
	}
	
	public void setControl_Sanitarioid_control_sanitario(java.util.Set<ControlSanitario> value) {
		this.control_Sanitarioid_control_sanitario = value;
	}
	
	public java.util.Set<ControlSanitario> getControl_Sanitarioid_control_sanitario() {
		return control_Sanitarioid_control_sanitario;
	}
	
	
	public void setMedicamentoid_medicamento(Medicamento value) {
		this.medicamentoid_medicamento = value;
	}
	
	public Medicamento getMedicamentoid_medicamento() {
		return medicamentoid_medicamento;
	}
	
	public void setEnfermedadid_enfermedad(Enfermedad value) {
		this.enfermedadid_enfermedad = value;
	}
	
	public Enfermedad getEnfermedadid_enfermedad() {
		return enfermedadid_enfermedad;
	}
	
	public void setAnimalid_animal1(Animal value) {
		this.animalid_animal1 = value;
	}
	
	public Animal getAnimalid_animal1() {
		return animalid_animal1;
	}
	
	public void setAnimalid_animal(java.util.Set<Animal> value) {
		this.animalid_animal = value;
	}
	
	public java.util.Set<Animal> getAnimalid_animal() {
		return animalid_animal;
	}
	
	
	public void setControl_Sanitarioid_control_sanitario2(java.util.Set<ControlSanitario> value) {
		this.control_Sanitarioid_control_sanitario2 = value;
	}
	
	public java.util.Set<ControlSanitario> getControl_Sanitarioid_control_sanitario2() {
		return control_Sanitarioid_control_sanitario2;
	}
	
	
	public String toString() {
		return String.valueOf(getId_control_sanitario());
	}
	
}
